package constant

type Code struct {
	Code string
	Msg  string
}

// 通用状态码,A开头是前端模块导致的异常，B开头是后端模块导致的异常
var (
	SUCCESS = Code{"200", "成功"}

	INVALID_PARAM        = Code{"A0001", "参数错误"}
	CATEGORY_DEL_ERROR   = Code{"A1001", "删除类别失败，类别已被使用"}
	TASK_NAME_USED_ERROR = Code{"A1002", "任务名称已被使用"}

	DATABASE_CONNECT_ERROR = Code{"B0001", "数据库连接错误"}
	DATABASE_OPERATE_ERROR = Code{"B0002", "数据库操作错误"}

	OTHER_ERROR = Code{"C0001", "其他错误"}
)
